<!DOCTYPE html>
<html lang="zh-CN" class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="cache-control" content="max-age=0">
    <meta http-equiv="cache-control" content="no-cache">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <title>staticswfobject静态页面直播</title>
</head>
<body >

<div class="container">
    <div class="row">
        <div class="col-lg-12  clearfix-context">
            <div class="main-box no-header clearfix">
                <div class="main-box-body clearfix">
                    <video id="video-player" webkit-playsinline controls></video>
                </div>
            </div>
            <p></p>
            <div class="input-group">
                <span class="input-group-btn input-btn">
                        <a class="btn btn-default" id="video-button" href="javascript:playLiveChannel()"><span>Play</span></a>
                </span>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/lib/player/swfobject.js"></script> <!--必须的的-->
<script lang="text/javascript">
    function playLiveChannel() {
        src = "{$play_address}";
        var swfPlayer = new SWFPlayer("video-container", "video-player", "550", "375", "8.0.0");
        $("#video-button").hide();
        swfPlayer.reload(src);
    }

    var SWFPlayer = function(_parent_id,_player_id,_width,_height, _poster){
        var parent_id = _parent_id;
        var player_id = _player_id;
        var width = _width;
        var height = _height;
        var poster = _poster;

        function createPlayer(src){
            var parameters = {
                src: src,
                autoPlay: "true",
                verbose: "true",
                controlBarAutoHide: "true",
                controlBarPosition: "bottom",
                poster: poster,
                plugin_hls: "player/HLSDynamicPlugin.swf"
            };
            var wmodeValue = "transparent";
            swfobject.embedSWF(
                    "player/StrobeMediaPlayback.swf"
                    , player_id
                    , width
                    , height
                    , "11"
                    , "player/expressInstall.swf"
                    , parameters
                    , {
                        allowFullScreen: "true",
                        wmode: wmodeValue
                    }
                    , {
                        name: player_id
                    }
            );
            swffit("my_flash",550,400);
        };
        createPlayer("");
        this.reload = function(src){
            createPlayer(src);
        };
    };
</script>
</body>
</html>
